import { Controller, Get, UseGuards } from '@nestjs/common';
import { UserService } from './user.service';
import { jwtGuard } from '../auth/guard';
import { GetUser } from '../auth/decorator';
import { User } from '@prisma/client';

@UseGuards(jwtGuard)
@Controller('user')
export class UserController {
  constructor(private user: UserService) {}
  @Get('/me')
  me(@GetUser() user: User) {
    return { success: true, data: user };
  }
}
